const InfoMy = require('../../models/blog_info_my');
const InfoWebsite = require('../../models/blog_info_website');

const ControllerAbout = {
    getMyInfo: async function (req, res, next) {
        try {
            const list = await InfoMy.all();
            res.json({ code: 200, data: { list: list[0] } })
        } catch (e) {
            res.json({ code: 0, data: e })
        }
    },
    getWebsiteInfo: async function (req, res, next) {
        try {
            const list = await InfoWebsite.all();
            res.json({ code: 200, data: { list: list[0] } })
        } catch (e) {
            res.json({ code: 0, data: e })
        }
    }
}

module.exports = ControllerAbout;